set(MICROSTRAIN_EXTRAS_LIBRARY "microstrain_extras" CACHE INTERNAL "Name of the MicroStrain extras library")
mark_as_advanced(MICROSTRAIN_EXTRAS_LIBRARY)

add_library(${MICROSTRAIN_EXTRAS_LIBRARY}
    "${CMAKE_CURRENT_LIST_DIR}/scope_helper.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/scope_helper.hpp"
)


target_compile_features(${MICROSTRAIN_EXTRAS_LIBRARY} PUBLIC cxx_std_11)

target_link_libraries(${MICROSTRAIN_EXTRAS_LIBRARY} PUBLIC ${MICROSTRAIN_COMMON_LIBRARY})

target_compile_definitions(${MICROSTRAIN_EXTRAS_LIBRARY}
    PUBLIC "MICROSTRAIN_ENABLE_EXTRAS=1"
    PRIVATE ${MICROSTRAIN_PRIVATE_COMPILE_DEFINITIONS}
)

target_compile_options(${MICROSTRAIN_EXTRAS_LIBRARY} PRIVATE ${MICROSTRAIN_PRIVATE_COMPILE_OPTIONS})

set(MICROSTRAIN_LIBRARIES_TMP ${MICROSTRAIN_LIBRARIES_TMP} ${MICROSTRAIN_EXTRAS_LIBRARY} PARENT_SCOPE)

#
# Installation
#

include(microstrain_utilities)
microstrain_setup_library_install(${MICROSTRAIN_EXTRAS_LIBRARY} ${MICROSTRAIN_SRC_DIR})
